package io.github.wanggit.website.demos.zipkin_service_1.web;

import io.github.wanggit.website.demos.zipkin_service_1.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/demo")
public class DemoController {

    @Autowired
    private DemoService demoService;

    @GetMapping("/run")
    public String run(@RequestParam("name") String name){
        return "Ok: " + demoService.start(name);
    }

}
